#ifndef __LEVEL_HPP__

#define __LEVEL_HPP__

namespace Log
{
    class LogLevel
    {
    public:
        enum value
        {
            UNKNOW = 0, // 未知错误
            DEBUG,      // 调试信息
            INFO,       // 提示信息
            WARN,       // 警告
            ERROR,      // 错误
            FATAL,      // 致命错误
            OFF,        // 关闭
        };
        static const char *toString(const LogLevel::value level)
        {
            switch (level)
            {
            case Log::LogLevel::value::DEBUG:
                return "DEBUG";
            case Log::LogLevel::value::INFO:
                return "INFO";
            case Log::LogLevel::value::WARN:
                return "WARN";
            case Log::LogLevel::value::ERROR:
                return "ERROR";
            case Log::LogLevel::value::FATAL:
                return "FATAL";
            case Log::LogLevel::value::OFF:
                return "OFF";
            default:
                return "UNKNOW";
            }
        }
    };
}// namespace Log

#endif // !__LEVEL_HPP__